<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
<title>Brains.cc - 快速看懂支持向量机 </title>

<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'/>
<link href='//fonts.googleapis.com/css?family=Source+Code+Pro:500,600' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" id="color-change" href="">
<link rel="stylesheet" id="switch-style" href="/css/grid.css">
<link rel="alternate" type="application/rss+xml" title="Brains.cc" href="/feed.xml">

    </head>

    <body>
        <header class="head">
            <div class="row">
    <a href="/" class="logo noline">
        <!-- full logo version with slogan, icon and text, add the class .ts-full if you want to work with some of the existing CSS -->
   <svg version="1.1" viewBox="0 0 677.61096 179.54858" class="ts-full">
   
        <g transform="" class="icon">
            <g transform="translate(-0.30800736,-0.61600967)">
				<path class="lines" d="m 58.803951,42.251728 -9.147281,9.147281 -0.435585,39.202634 7.840527,7.404942 -0.435585,12.196375"  />
				<path class="lines" d="M 58.828952,36.652593 85.009375,10.472169 103.48967,10.164164"  />
				<path class="lines" d="m 108.41775,7.3921196 4.00407,-4.0040648 49.2808,0.61601 9.54815,9.5481542 14.78424,0.61601 17.55628,17.248279"  />
				<path class="lines" d="m 210.0594,37.268603 v 8.316134 l 8.93214,8.00813 0.30801,33.880548 -14.16823,14.168225 -41.27267,-0.308"  />
				<path class="lines" d="m 160.16259,95.481545 h -6.4681 l -11.08818,11.704185"  />
				<path class="lines" d="m 171.86678,95.481545 26.18042,0.61601"  />
				<path class="lines" d="m 204.82331,95.17354 9.85616,-9.548155 V 73.613191"  />
				<path class="lines" d="M 209.44339,66.221071 V 84.393365"  />
				<path class="lines" d="m 211.29142,54.208877 -7.08412,7.700125 V 89.01344"  />
				<path class="lines" d="M 195.27516,91.169475 174.02282,90.553465 166.9387,84.08536"  />
				<path class="lines" d="m 176.79486,85.93339 h 8.00813 l 9.85616,-9.548154 0.61601,-21.560349 6.4681,-7.084115"  />
				<path class="lines" d="m 199.27922,57.596932 v 20.636334 l -7.08411,7.084114"  />
				<path class="lines" d="m 149.07441,90.86147 -13.55222,13.55222 v 25.87242"  />
				<path class="lines" d="m 166.32269,90.86147 -5.85209,-5.54409 h -11.70419 l -18.1723,16.94027 v 32.03252 l -14.78424,14.78424"  />
				<path class="lines" d="m 179.2589,80.081296 -32.64853,-0.308005 -20.63633,20.328329 v 31.72451 l -14.16823,13.86023 -0.61601,23.71638"  />
				<path class="lines" d="m 168.17072,75.153216 h -23.10037 l -23.10038,22.792369 v 32.340525 l -14.78424,13.55222 v 33.57254"  />
				<path class="lines" d="m 97.63758,148.4584 4.31207,5.23609 v 9.24015"  />
				<path class="lines" d="m 184.18698,76.385236 -5.54409,-5.852095 -17.86429,-0.61601 -7.08411,-7.084114"  />
				<path class="lines" d="m 181.10693,67.145086 -5.54409,-5.852094 -12.01219,0.308005"  />
				<path class="lines" d="M 188.19104,66.837081 177.10287,56.364912 h -48.04878"  />
				<path class="lines" d="m 201.74326,38.500623 -12.3202,13.244214"  />
				<path class="lines" d="M 194.35114,37.884613 185.419,46.508752"  />
				<path class="lines" d="m 198.0472,32.032518 h -10.78017 l -6.1601,6.468105 h -13.24421"  />
				<path class="lines" d="m 190.65508,27.104438 -11.70418,-0.308004 -5.8521,5.852094"  />
				<path class="lines" d="m 185.11099,21.868354 h -9.54815 l -15.40025,15.400249"  />
				<path class="lines" d="M 170.32676,17.556284 153.38648,34.804563"  />
				<path class="lines" d="M 152.15446,21.868354 136.1382,39.116633 H 116.11788 L 101.64164,24.332394"  />
				<path class="lines" d="m 145.37835,37.268603 6.77611,7.39212 20.02033,-0.61601 16.01625,15.708254"  />
				<path class="lines" d="m 173.0988,51.436832 h -47.12476 l -8.31614,8.00813"  />
				<path class="lines" d="m 124.12601,62.217007 20.94434,-0.61601 7.70012,8.008129"  />
				<path class="lines" d="m 139.52626,68.069101 -6.1601,6.77611 v 6.160099"  />
				<path class="lines" d="m 164.16666,16.324264 h -15.40025 l -8.00813,8.00813"  />
				<path class="lines" d="m 137.06222,28.028453 -4.31207,4.620075 -15.40025,-0.308005"  />
				<path class="lines" d="m 138.60224,15.092244 -8.62414,9.85616 h -20.63633"  />
				<path class="lines" d="m 159.85459,11.396184 h -28.02846 l -7.70012,8.62414"  />
				<path class="lines" d="m 123.20199,10.472169 -7.70012,8.00813 -16.940275,0.308005"  />
				<path class="lines" d="m 144.17858,44.21186 -29.83756,-0.435585 -11.543,10.671828 -0.65338,21.561449"  />
				<path class="lines" d="m 111.29192,56.190442 0.21779,13.50313 10.67183,10.671828 -0.43558,10.671828"  />
				<path class="lines" d="M 128.49752,86.245795 128.27973,77.316306 117.6079,66.208893"  />
				<path class="lines" d="m 108.46062,76.009552 7.84053,7.840527"  />
				<path class="lines" d="m 116.73673,88.859304 -0.21779,37.895876 -14.3743,14.80989 -21.561448,0.21779"  />
				<path class="lines" d="m 100.62009,88.205927 8.49391,8.058319"  />
				<path class="lines" d="m 111.9453,100.83789 -14.592092,0.21779 -8.058319,-8.493905"  />
				<path class="lines" d="m 93.650737,87.988134 8.276113,8.276112"  />
				<path class="lines" d="m 85.156833,97.353208 8.929489,9.147282 h 18.294558"  />
				<path class="lines" d="m 108.89621,110.85634 -28.313018,0.21779 -9.147281,8.92949"  />
				<path class="lines" d="M 105.84711,115.64777 91.037228,116.08336 80.3654,126.75518"  />
				<path class="lines" d="M 87.988134,128.49752 95.393076,120.657"  />
				<path class="lines" d="m 112.59868,117.17232 -14.592095,15.24547 -20.036901,0.43558 -14.156507,-14.3743"  />
				<path class="lines" d="m 57.061612,118.26128 18.512355,19.16573 23.957165,-0.21779 12.849748,-12.63196"  />
				<path class="lines" d="M 105.19374,82.978909 H 92.12619 L 67.951233,106.71828"  />
				<path class="lines" d="M 62.724215,102.58023 83.632286,81.889947"  />
				<path class="lines" d="m 69.475779,86.899172 -8.058319,8.05832"  />
				<path class="lines" d="M 59.239536,88.205927 65.991101,81.23657 77.098514,81.018777"  />
				<path class="lines" d="m 56.84382,69.475779 6.31598,-0.217792 6.098187,6.533772"  />
				<path class="lines" d="m 62.28863,60.328498 14.592091,15.245469 20.036902,0.217792"  />
				<path class="lines" d="M 79.49423,70.129157 66.426686,56.408235 65.991101,47.696538"  />
				<path class="lines" d="m 68.386817,37.678087 9.582867,10.236244 20.036901,0.217792"  />
				<path class="lines" d="m 72.960458,33.322239 8.058319,8.276112"  />
				<path class="lines" d="m 86.028003,17.205601 7.404942,7.840526"  />
				<path class="lines" d="m 99.095547,30.926523 4.573643,4.355848 v 8.276111"  />
				<path class="lines" d="m 83.850079,24.610543 9.365073,9.582866 v 8.711696"  />
				<path class="lines" d="m 87.770342,52.705764 8.929489,8.929489 v 8.276111"  />
				<path class="lines" d="M 73.17825,53.141349 89.730474,69.693572"  />
			</g>
			<g>	
				<circle class="rectangle" cx="58.440441" cy="36.225616" r="2.25" />
				<circle class="rectangle" cx="103.18167" cy="10.164165" r="2.25" />
				<circle class="rectangle" cx="108.26376" cy="7.0841146" r="2.25" />
				<circle class="rectangle" cx="123.20199" cy="10.626171" r="2.25" />
				<circle class="rectangle" cx="98.407593" cy="18.634302" r="2.25" />
				<circle class="rectangle" cx="85.779388" cy="16.78627" r="2.25" />
				<circle class="rectangle" cx="93.017502" cy="24.794401" r="2.25" />
				<circle class="rectangle" cx="101.79565" cy="24.332394" r="2.25" />
				<circle class="rectangle" cx="109.49577" cy="24.794401" r="2.25" />
				<circle class="rectangle" cx="124.28001" cy="19.866322" r="2.25" />
				<circle class="rectangle" cx="159.85458" cy="11.242182" r="2.25" />
				<circle class="rectangle" cx="140.91228" cy="24.332394" r="2.25" />
				<circle class="rectangle" cx="136.44621" cy="28.028454" r="2.25" />
				<circle class="rectangle" cx="164.16666" cy="16.324265" r="2.25" />
				<circle class="rectangle" cx="170.17274" cy="18.018291" r="2.25" />
				<circle class="rectangle" cx="184.80299" cy="21.868353" r="2.25" />
				<circle class="rectangle" cx="190.65508" cy="26.950436" r="2.25" />
				<circle class="rectangle" cx="196.81519" cy="31.878515" r="2.25" />
				<circle class="rectangle" cx="203.7453" cy="31.416508" r="2.25" />
				<circle class="rectangle" cx="210.0594" cy="37.268604" r="2.25" />
				<circle class="rectangle" cx="201.12726" cy="39.116634" r="2.25" />
				<circle class="rectangle" cx="194.04314" cy="38.192619" r="2.25" />
				<circle class="rectangle" cx="185.88101" cy="46.046745" r="2.25" />
				<circle class="rectangle" cx="190.03908" cy="51.128826" r="2.25" />
				<circle class="rectangle" cx="201.58926" cy="48.048779" r="2.25" />
				<circle class="rectangle" cx="210.67542" cy="54.516884" r="2.25" />
				<circle class="rectangle" cx="199.27922" cy="57.750935" r="2.25" />
				<circle class="rectangle" cx="209.5974" cy="66.375076" r="2.25" />
				<circle class="rectangle" cx="209.44339" cy="83.469353" r="2.25" />
				<circle class="rectangle" cx="214.52547" cy="74.075195" r="2.25" />
				<circle class="rectangle" cx="204.20732" cy="95.635544" r="2.25" />
				<circle class="rectangle" cx="197.4312" cy="95.94355" r="2.25" />
				<circle class="rectangle" cx="172.3288" cy="95.481544" r="2.25" />
				<circle class="rectangle" cx="166.01468" cy="90.553467" r="2.25" />
				<circle class="rectangle" cx="167.2467" cy="84.085358" r="2.25" />
				<circle class="rectangle" cx="177.10286" cy="85.625389" r="2.25" />
				<circle class="rectangle" cx="192.81113" cy="84.85537" r="2.25" />
				<circle class="rectangle" cx="187.72903" cy="65.913063" r="2.25" />
				<circle class="rectangle" cx="187.88304" cy="58.828953" r="2.25" />
				<circle class="rectangle" cx="180.02892" cy="65.913063" r="2.25" />
				<circle class="rectangle" cx="164.16666" cy="61.446995" r="2.25" />
				<circle class="rectangle" cx="154.15649" cy="63.295025" r="2.25" />
				<circle class="rectangle" cx="183.87897" cy="75.923225" r="2.25" />
				<circle class="rectangle" cx="178.33488" cy="79.927292" r="2.25" />
				<circle class="rectangle" cx="152.15446" cy="68.839111" r="2.25" />
				<circle class="rectangle" cx="167.86272" cy="74.999214" r="2.25" />
				<circle class="rectangle" cx="139.06425" cy="68.531105" r="2.25" />
				<circle class="rectangle" cx="133.21216" cy="79.465286" r="2.25" />
				<circle class="rectangle" cx="128.28407" cy="84.393364" r="2.25" />
				<circle class="rectangle" cx="121.81597" cy="90.55143" r="2.25" />
				<circle class="rectangle" cx="115.65587" cy="82.85334" r="2.25" />
				<circle class="rectangle" cx="172.48279" cy="51.282829" r="2.25" />
				<circle class="rectangle" cx="118.42792" cy="58.520947" r="2.25" />
				<circle class="rectangle" cx="124.58801" cy="61.909" r="2.25" />
				<circle class="rectangle" cx="129.6701" cy="56.36491" r="2.25" />
				<circle class="rectangle" cx="193.88914" cy="90.707466" r="2.25" />
				<circle class="rectangle" cx="204.0533" cy="87.473419" r="2.25" />
				<circle class="rectangle" cx="164.32066" cy="100.87163" r="2.25" />
				<circle class="rectangle" cx="159.85458" cy="95.173538" r="2.25" />
				<circle class="rectangle" cx="142.76031" cy="106.72372" r="2.25" />
				<circle class="rectangle" cx="148.7664" cy="90.861473" r="2.25" />
				<circle class="rectangle" cx="168.32472" cy="38.500622" r="2.25" />
				<circle class="rectangle" cx="173.8688" cy="32.032516" r="2.25" />
				<circle class="rectangle" cx="160.77859" cy="36.344589" r="2.25" />
				<circle class="rectangle" cx="153.69449" cy="33.880547" r="2.25" />
				<circle class="rectangle" cx="145.53235" cy="37.114601" r="2.25" />
				<circle class="rectangle" cx="143.53032" cy="44.044712" r="2.25" />
				<circle class="rectangle" cx="152.00046" cy="22.330362" r="2.25" />
				<circle class="rectangle" cx="138.29424" cy="15.400249" r="2.25" />
				<circle class="rectangle" cx="118.11991" cy="32.18652" r="2.25" />
				<circle class="rectangle" cx="111.29192" cy="56.408234" r="2.25" />
				<circle class="rectangle" cx="118.04349" cy="66.426689" r="2.25" />
				<circle class="rectangle" cx="116.73673" cy="89.077095" r="2.25" />
				<circle class="rectangle" cx="108.34463" cy="75.587196" r="2.25" />
				<circle class="rectangle" cx="135.63022" cy="129.53204" r="2.25" />
				<circle class="rectangle" cx="99.258896" cy="31.089867" r="2.25" />
				<circle class="rectangle" cx="103.50584" cy="43.014" r="2.25" />
				<circle class="rectangle" cx="84.067871" cy="24.719439" r="2.25" />
				<circle class="rectangle" cx="93.324051" cy="42.523968" r="2.25" />
				<circle class="rectangle" cx="80.093163" cy="40.509388" r="2.25" />
				<circle class="rectangle" cx="73.123802" cy="33.594479" r="2.25" />
				<circle class="rectangle" cx="97.135414" cy="47.805435" r="2.25" />
				<circle class="rectangle" cx="68.604607" cy="38.004776" r="2.25" />
				<circle class="rectangle" cx="88.097031" cy="52.814659" r="2.25" />
				<circle class="rectangle" cx="96.75428" cy="68.822403" r="2.25" />
				<circle class="rectangle" cx="88.859306" cy="68.876854" r="2.25" />
				<circle class="rectangle" cx="73.396042" cy="53.359142" r="2.25" />
				<circle class="rectangle" cx="78.677505" cy="69.149094" r="2.25" />
				<circle class="rectangle" cx="65.936653" cy="47.91433" r="2.25" />
				<circle class="rectangle" cx="58.205021" cy="42.796207" r="2.25" />
				<circle class="rectangle" cx="62.451973" cy="60.491844" r="2.25" />
				<circle class="rectangle" cx="57.551643" cy="69.366882" r="2.25" />
				<circle class="rectangle" cx="68.659058" cy="74.975037" r="2.25" />
				<circle class="rectangle" cx="76.281792" cy="80.746536" r="2.25" />
				<circle class="rectangle" cx="59.784016" cy="87.4981" r="2.25" />
				<circle class="rectangle" cx="68.822403" cy="87.062515" r="2.25" />
				<circle class="rectangle" cx="61.961941" cy="94.086319" r="2.25" />
				<circle class="rectangle" cx="83.087807" cy="82.162186" r="2.25" />
				<circle class="rectangle" cx="63.10535" cy="101.9813" r="2.25" />
				<circle class="rectangle" cx="68.441269" cy="106.01046" r="2.25" />
				<circle class="rectangle" cx="85.15683" cy="97.298759" r="2.25" />
				<circle class="rectangle" cx="89.349335" cy="92.507324" r="2.25" />
				<circle class="rectangle" cx="93.705185" cy="87.933685" r="2.25" />
				<circle class="rectangle" cx="56.626026" cy="109.82182" r="2.25" />
				<circle class="rectangle" cx="57.061611" cy="118.09794" r="2.25" />
				<circle class="rectangle" cx="63.976521" cy="118.37018" r="2.25" />
				<circle class="rectangle" cx="71.544807" cy="119.89472" r="2.25" />
				<circle class="rectangle" cx="80.419846" cy="126.64629" r="2.25" />
				<circle class="rectangle" cx="88.04258" cy="128.27972" r="2.25" />
				<circle class="rectangle" cx="95.229729" cy="120.60255" r="2.25" />
				<circle class="rectangle" cx="81.073227" cy="141.61952" r="2.25" />
				<circle class="rectangle" cx="97.788795" cy="148.58888" r="2.25" />
				<circle class="rectangle" cx="115.92001" cy="148.64331" r="2.25" />
				<circle class="rectangle" cx="101.8724" cy="161.98311" r="2.25" />
				<circle class="rectangle" cx="106.88163" cy="176.73854" r="2.25" />
				<circle class="rectangle" cx="111.18303" cy="168.40799" r="2.25" />
				<circle class="rectangle" cx="111.9453" cy="124.63171" r="2.25" />
				<circle class="rectangle" cx="112.27199" cy="117.44456" r="2.25" />
				<circle class="rectangle" cx="104.97594" cy="115.32108" r="2.25" />
				<circle class="rectangle" cx="108.56952" cy="110.69299" r="2.25" />
				<circle class="rectangle" cx="111.89085" cy="106.22825" r="2.25" />
				<circle class="rectangle" cx="111.34637" cy="100.56564" r="2.25" />
				<circle class="rectangle" cx="108.40617" cy="95.338631" r="2.25" />
				<circle class="rectangle" cx="100.83789" cy="95.01194" r="2.25" />
				<circle class="rectangle" cx="100.94678" cy="88.151482" r="2.25" />
				<circle class="rectangle" cx="104.75815" cy="82.815567" r="2.25" />
				<circle class="rectangle" cx="102.14464" cy="75.356171" r="2.25" />
				<circle class="rectangle" cx="96.209801" cy="75.573967" r="2.25" />
			</g>
        </g>
        <text x="225.57599" y="103.42776" class="gridster">
            <tspan x="225.57599" y="103.42776">Brains</tspan>
        </text>
        <text x="195.14201" y="157.68172" class="slogan">
            <tspan x="195.14201" y="157.68172">Control Center: train my ability</tspan>
        </text>
   
</svg>
        <!-- logo version without slogan, add the class .ts-no-slogan if you want to work with some of the existing CSS -->
<svg version="1.1" viewBox="0 0 677.61096 179.54858" class="ts-no-slogan">
	<g transform="" class="icon">
		<g transform="translate(-0.30800736,-0.61600967)">
			<path class="lines" d="m 58.803951,42.251728 -9.147281,9.147281 -0.435585,39.202634 7.840527,7.404942 -0.435585,12.196375"  />
			<path class="lines" d="M 58.828952,36.652593 85.009375,10.472169 103.48967,10.164164"  />
			<path class="lines" d="m 108.41775,7.3921196 4.00407,-4.0040648 49.2808,0.61601 9.54815,9.5481542 14.78424,0.61601 17.55628,17.248279"  />
			<path class="lines" d="m 210.0594,37.268603 v 8.316134 l 8.93214,8.00813 0.30801,33.880548 -14.16823,14.168225 -41.27267,-0.308"  />
			<path class="lines" d="m 160.16259,95.481545 h -6.4681 l -11.08818,11.704185"  />
			<path class="lines" d="m 171.86678,95.481545 26.18042,0.61601"  />
			<path class="lines" d="m 204.82331,95.17354 9.85616,-9.548155 V 73.613191"  />
			<path class="lines" d="M 209.44339,66.221071 V 84.393365"  />
			<path class="lines" d="m 211.29142,54.208877 -7.08412,7.700125 V 89.01344"  />
			<path class="lines" d="M 195.27516,91.169475 174.02282,90.553465 166.9387,84.08536"  />
			<path class="lines" d="m 176.79486,85.93339 h 8.00813 l 9.85616,-9.548154 0.61601,-21.560349 6.4681,-7.084115"  />
			<path class="lines" d="m 199.27922,57.596932 v 20.636334 l -7.08411,7.084114"  />
			<path class="lines" d="m 149.07441,90.86147 -13.55222,13.55222 v 25.87242"  />
			<path class="lines" d="m 166.32269,90.86147 -5.85209,-5.54409 h -11.70419 l -18.1723,16.94027 v 32.03252 l -14.78424,14.78424"  />
			<path class="lines" d="m 179.2589,80.081296 -32.64853,-0.308005 -20.63633,20.328329 v 31.72451 l -14.16823,13.86023 -0.61601,23.71638"  />
			<path class="lines" d="m 168.17072,75.153216 h -23.10037 l -23.10038,22.792369 v 32.340525 l -14.78424,13.55222 v 33.57254"  />
			<path class="lines" d="m 97.63758,148.4584 4.31207,5.23609 v 9.24015"  />
			<path class="lines" d="m 184.18698,76.385236 -5.54409,-5.852095 -17.86429,-0.61601 -7.08411,-7.084114"  />
			<path class="lines" d="m 181.10693,67.145086 -5.54409,-5.852094 -12.01219,0.308005"  />
			<path class="lines" d="M 188.19104,66.837081 177.10287,56.364912 h -48.04878"  />
			<path class="lines" d="m 201.74326,38.500623 -12.3202,13.244214"  />
			<path class="lines" d="M 194.35114,37.884613 185.419,46.508752"  />
			<path class="lines" d="m 198.0472,32.032518 h -10.78017 l -6.1601,6.468105 h -13.24421"  />
			<path class="lines" d="m 190.65508,27.104438 -11.70418,-0.308004 -5.8521,5.852094"  />
			<path class="lines" d="m 185.11099,21.868354 h -9.54815 l -15.40025,15.400249"  />
			<path class="lines" d="M 170.32676,17.556284 153.38648,34.804563"  />
			<path class="lines" d="M 152.15446,21.868354 136.1382,39.116633 H 116.11788 L 101.64164,24.332394"  />
			<path class="lines" d="m 145.37835,37.268603 6.77611,7.39212 20.02033,-0.61601 16.01625,15.708254"  />
			<path class="lines" d="m 173.0988,51.436832 h -47.12476 l -8.31614,8.00813"  />
			<path class="lines" d="m 124.12601,62.217007 20.94434,-0.61601 7.70012,8.008129"  />
			<path class="lines" d="m 139.52626,68.069101 -6.1601,6.77611 v 6.160099"  />
			<path class="lines" d="m 164.16666,16.324264 h -15.40025 l -8.00813,8.00813"  />
			<path class="lines" d="m 137.06222,28.028453 -4.31207,4.620075 -15.40025,-0.308005"  />
			<path class="lines" d="m 138.60224,15.092244 -8.62414,9.85616 h -20.63633"  />
			<path class="lines" d="m 159.85459,11.396184 h -28.02846 l -7.70012,8.62414"  />
			<path class="lines" d="m 123.20199,10.472169 -7.70012,8.00813 -16.940275,0.308005"  />
			<path class="lines" d="m 144.17858,44.21186 -29.83756,-0.435585 -11.543,10.671828 -0.65338,21.561449"  />
			<path class="lines" d="m 111.29192,56.190442 0.21779,13.50313 10.67183,10.671828 -0.43558,10.671828"  />
			<path class="lines" d="M 128.49752,86.245795 128.27973,77.316306 117.6079,66.208893"  />
			<path class="lines" d="m 108.46062,76.009552 7.84053,7.840527"  />
			<path class="lines" d="m 116.73673,88.859304 -0.21779,37.895876 -14.3743,14.80989 -21.561448,0.21779"  />
			<path class="lines" d="m 100.62009,88.205927 8.49391,8.058319"  />
			<path class="lines" d="m 111.9453,100.83789 -14.592092,0.21779 -8.058319,-8.493905"  />
			<path class="lines" d="m 93.650737,87.988134 8.276113,8.276112"  />
			<path class="lines" d="m 85.156833,97.353208 8.929489,9.147282 h 18.294558"  />
			<path class="lines" d="m 108.89621,110.85634 -28.313018,0.21779 -9.147281,8.92949"  />
			<path class="lines" d="M 105.84711,115.64777 91.037228,116.08336 80.3654,126.75518"  />
			<path class="lines" d="M 87.988134,128.49752 95.393076,120.657"  />
			<path class="lines" d="m 112.59868,117.17232 -14.592095,15.24547 -20.036901,0.43558 -14.156507,-14.3743"  />
			<path class="lines" d="m 57.061612,118.26128 18.512355,19.16573 23.957165,-0.21779 12.849748,-12.63196"  />
			<path class="lines" d="M 105.19374,82.978909 H 92.12619 L 67.951233,106.71828"  />
			<path class="lines" d="M 62.724215,102.58023 83.632286,81.889947"  />
			<path class="lines" d="m 69.475779,86.899172 -8.058319,8.05832"  />
			<path class="lines" d="M 59.239536,88.205927 65.991101,81.23657 77.098514,81.018777"  />
			<path class="lines" d="m 56.84382,69.475779 6.31598,-0.217792 6.098187,6.533772"  />
			<path class="lines" d="m 62.28863,60.328498 14.592091,15.245469 20.036902,0.217792"  />
			<path class="lines" d="M 79.49423,70.129157 66.426686,56.408235 65.991101,47.696538"  />
			<path class="lines" d="m 68.386817,37.678087 9.582867,10.236244 20.036901,0.217792"  />
			<path class="lines" d="m 72.960458,33.322239 8.058319,8.276112"  />
			<path class="lines" d="m 86.028003,17.205601 7.404942,7.840526"  />
			<path class="lines" d="m 99.095547,30.926523 4.573643,4.355848 v 8.276111"  />
			<path class="lines" d="m 83.850079,24.610543 9.365073,9.582866 v 8.711696"  />
			<path class="lines" d="m 87.770342,52.705764 8.929489,8.929489 v 8.276111"  />
			<path class="lines" d="M 73.17825,53.141349 89.730474,69.693572"  />
		</g>
		<g>	
			<circle class="rectangle" cx="58.440441" cy="36.225616" r="2.25" />
			<circle class="rectangle" cx="103.18167" cy="10.164165" r="2.25" />
			<circle class="rectangle" cx="108.26376" cy="7.0841146" r="2.25" />
			<circle class="rectangle" cx="123.20199" cy="10.626171" r="2.25" />
			<circle class="rectangle" cx="98.407593" cy="18.634302" r="2.25" />
			<circle class="rectangle" cx="85.779388" cy="16.78627" r="2.25" />
			<circle class="rectangle" cx="93.017502" cy="24.794401" r="2.25" />
			<circle class="rectangle" cx="101.79565" cy="24.332394" r="2.25" />
			<circle class="rectangle" cx="109.49577" cy="24.794401" r="2.25" />
			<circle class="rectangle" cx="124.28001" cy="19.866322" r="2.25" />
			<circle class="rectangle" cx="159.85458" cy="11.242182" r="2.25" />
			<circle class="rectangle" cx="140.91228" cy="24.332394" r="2.25" />
			<circle class="rectangle" cx="136.44621" cy="28.028454" r="2.25" />
			<circle class="rectangle" cx="164.16666" cy="16.324265" r="2.25" />
			<circle class="rectangle" cx="170.17274" cy="18.018291" r="2.25" />
			<circle class="rectangle" cx="184.80299" cy="21.868353" r="2.25" />
			<circle class="rectangle" cx="190.65508" cy="26.950436" r="2.25" />
			<circle class="rectangle" cx="196.81519" cy="31.878515" r="2.25" />
			<circle class="rectangle" cx="203.7453" cy="31.416508" r="2.25" />
			<circle class="rectangle" cx="210.0594" cy="37.268604" r="2.25" />
			<circle class="rectangle" cx="201.12726" cy="39.116634" r="2.25" />
			<circle class="rectangle" cx="194.04314" cy="38.192619" r="2.25" />
			<circle class="rectangle" cx="185.88101" cy="46.046745" r="2.25" />
			<circle class="rectangle" cx="190.03908" cy="51.128826" r="2.25" />
			<circle class="rectangle" cx="201.58926" cy="48.048779" r="2.25" />
			<circle class="rectangle" cx="210.67542" cy="54.516884" r="2.25" />
			<circle class="rectangle" cx="199.27922" cy="57.750935" r="2.25" />
			<circle class="rectangle" cx="209.5974" cy="66.375076" r="2.25" />
			<circle class="rectangle" cx="209.44339" cy="83.469353" r="2.25" />
			<circle class="rectangle" cx="214.52547" cy="74.075195" r="2.25" />
			<circle class="rectangle" cx="204.20732" cy="95.635544" r="2.25" />
			<circle class="rectangle" cx="197.4312" cy="95.94355" r="2.25" />
			<circle class="rectangle" cx="172.3288" cy="95.481544" r="2.25" />
			<circle class="rectangle" cx="166.01468" cy="90.553467" r="2.25" />
			<circle class="rectangle" cx="167.2467" cy="84.085358" r="2.25" />
			<circle class="rectangle" cx="177.10286" cy="85.625389" r="2.25" />
			<circle class="rectangle" cx="192.81113" cy="84.85537" r="2.25" />
			<circle class="rectangle" cx="187.72903" cy="65.913063" r="2.25" />
			<circle class="rectangle" cx="187.88304" cy="58.828953" r="2.25" />
			<circle class="rectangle" cx="180.02892" cy="65.913063" r="2.25" />
			<circle class="rectangle" cx="164.16666" cy="61.446995" r="2.25" />
			<circle class="rectangle" cx="154.15649" cy="63.295025" r="2.25" />
			<circle class="rectangle" cx="183.87897" cy="75.923225" r="2.25" />
			<circle class="rectangle" cx="178.33488" cy="79.927292" r="2.25" />
			<circle class="rectangle" cx="152.15446" cy="68.839111" r="2.25" />
			<circle class="rectangle" cx="167.86272" cy="74.999214" r="2.25" />
			<circle class="rectangle" cx="139.06425" cy="68.531105" r="2.25" />
			<circle class="rectangle" cx="133.21216" cy="79.465286" r="2.25" />
			<circle class="rectangle" cx="128.28407" cy="84.393364" r="2.25" />
			<circle class="rectangle" cx="121.81597" cy="90.55143" r="2.25" />
			<circle class="rectangle" cx="115.65587" cy="82.85334" r="2.25" />
			<circle class="rectangle" cx="172.48279" cy="51.282829" r="2.25" />
			<circle class="rectangle" cx="118.42792" cy="58.520947" r="2.25" />
			<circle class="rectangle" cx="124.58801" cy="61.909" r="2.25" />
			<circle class="rectangle" cx="129.6701" cy="56.36491" r="2.25" />
			<circle class="rectangle" cx="193.88914" cy="90.707466" r="2.25" />
			<circle class="rectangle" cx="204.0533" cy="87.473419" r="2.25" />
			<circle class="rectangle" cx="164.32066" cy="100.87163" r="2.25" />
			<circle class="rectangle" cx="159.85458" cy="95.173538" r="2.25" />
			<circle class="rectangle" cx="142.76031" cy="106.72372" r="2.25" />
			<circle class="rectangle" cx="148.7664" cy="90.861473" r="2.25" />
			<circle class="rectangle" cx="168.32472" cy="38.500622" r="2.25" />
			<circle class="rectangle" cx="173.8688" cy="32.032516" r="2.25" />
			<circle class="rectangle" cx="160.77859" cy="36.344589" r="2.25" />
			<circle class="rectangle" cx="153.69449" cy="33.880547" r="2.25" />
			<circle class="rectangle" cx="145.53235" cy="37.114601" r="2.25" />
			<circle class="rectangle" cx="143.53032" cy="44.044712" r="2.25" />
			<circle class="rectangle" cx="152.00046" cy="22.330362" r="2.25" />
			<circle class="rectangle" cx="138.29424" cy="15.400249" r="2.25" />
			<circle class="rectangle" cx="118.11991" cy="32.18652" r="2.25" />
			<circle class="rectangle" cx="111.29192" cy="56.408234" r="2.25" />
			<circle class="rectangle" cx="118.04349" cy="66.426689" r="2.25" />
			<circle class="rectangle" cx="116.73673" cy="89.077095" r="2.25" />
			<circle class="rectangle" cx="108.34463" cy="75.587196" r="2.25" />
			<circle class="rectangle" cx="135.63022" cy="129.53204" r="2.25" />
			<circle class="rectangle" cx="99.258896" cy="31.089867" r="2.25" />
			<circle class="rectangle" cx="103.50584" cy="43.014" r="2.25" />
			<circle class="rectangle" cx="84.067871" cy="24.719439" r="2.25" />
			<circle class="rectangle" cx="93.324051" cy="42.523968" r="2.25" />
			<circle class="rectangle" cx="80.093163" cy="40.509388" r="2.25" />
			<circle class="rectangle" cx="73.123802" cy="33.594479" r="2.25" />
			<circle class="rectangle" cx="97.135414" cy="47.805435" r="2.25" />
			<circle class="rectangle" cx="68.604607" cy="38.004776" r="2.25" />
			<circle class="rectangle" cx="88.097031" cy="52.814659" r="2.25" />
			<circle class="rectangle" cx="96.75428" cy="68.822403" r="2.25" />
			<circle class="rectangle" cx="88.859306" cy="68.876854" r="2.25" />
			<circle class="rectangle" cx="73.396042" cy="53.359142" r="2.25" />
			<circle class="rectangle" cx="78.677505" cy="69.149094" r="2.25" />
			<circle class="rectangle" cx="65.936653" cy="47.91433" r="2.25" />
			<circle class="rectangle" cx="58.205021" cy="42.796207" r="2.25" />
			<circle class="rectangle" cx="62.451973" cy="60.491844" r="2.25" />
			<circle class="rectangle" cx="57.551643" cy="69.366882" r="2.25" />
			<circle class="rectangle" cx="68.659058" cy="74.975037" r="2.25" />
			<circle class="rectangle" cx="76.281792" cy="80.746536" r="2.25" />
			<circle class="rectangle" cx="59.784016" cy="87.4981" r="2.25" />
			<circle class="rectangle" cx="68.822403" cy="87.062515" r="2.25" />
			<circle class="rectangle" cx="61.961941" cy="94.086319" r="2.25" />
			<circle class="rectangle" cx="83.087807" cy="82.162186" r="2.25" />
			<circle class="rectangle" cx="63.10535" cy="101.9813" r="2.25" />
			<circle class="rectangle" cx="68.441269" cy="106.01046" r="2.25" />
			<circle class="rectangle" cx="85.15683" cy="97.298759" r="2.25" />
			<circle class="rectangle" cx="89.349335" cy="92.507324" r="2.25" />
			<circle class="rectangle" cx="93.705185" cy="87.933685" r="2.25" />
			<circle class="rectangle" cx="56.626026" cy="109.82182" r="2.25" />
			<circle class="rectangle" cx="57.061611" cy="118.09794" r="2.25" />
			<circle class="rectangle" cx="63.976521" cy="118.37018" r="2.25" />
			<circle class="rectangle" cx="71.544807" cy="119.89472" r="2.25" />
			<circle class="rectangle" cx="80.419846" cy="126.64629" r="2.25" />
			<circle class="rectangle" cx="88.04258" cy="128.27972" r="2.25" />
			<circle class="rectangle" cx="95.229729" cy="120.60255" r="2.25" />
			<circle class="rectangle" cx="81.073227" cy="141.61952" r="2.25" />
			<circle class="rectangle" cx="97.788795" cy="148.58888" r="2.25" />
			<circle class="rectangle" cx="115.92001" cy="148.64331" r="2.25" />
			<circle class="rectangle" cx="101.8724" cy="161.98311" r="2.25" />
			<circle class="rectangle" cx="106.88163" cy="176.73854" r="2.25" />
			<circle class="rectangle" cx="111.18303" cy="168.40799" r="2.25" />
			<circle class="rectangle" cx="111.9453" cy="124.63171" r="2.25" />
			<circle class="rectangle" cx="112.27199" cy="117.44456" r="2.25" />
			<circle class="rectangle" cx="104.97594" cy="115.32108" r="2.25" />
			<circle class="rectangle" cx="108.56952" cy="110.69299" r="2.25" />
			<circle class="rectangle" cx="111.89085" cy="106.22825" r="2.25" />
			<circle class="rectangle" cx="111.34637" cy="100.56564" r="2.25" />
			<circle class="rectangle" cx="108.40617" cy="95.338631" r="2.25" />
			<circle class="rectangle" cx="100.83789" cy="95.01194" r="2.25" />
			<circle class="rectangle" cx="100.94678" cy="88.151482" r="2.25" />
			<circle class="rectangle" cx="104.75815" cy="82.815567" r="2.25" />
			<circle class="rectangle" cx="102.14464" cy="75.356171" r="2.25" />
			<circle class="rectangle" cx="96.209801" cy="75.573967" r="2.25" />
		</g>
	</g>
	<text x="225.57599" y="103.42776" class="gridster">
		<tspan x="225.57599" y="103.42776">Brains</tspan>
	</text>

</svg>
        <!-- icon logo version, add the class .ts-icon if you want to work with some of the existing CSS -->
<svg version="1.1" viewBox="0 0 179.52826 179.54858" class="ts-icon">

	<g transform="" class="icon">
		<g transform="translate(-0.30800736,-0.61600967)">
			<path class="lines" d="m 58.803951,42.251728 -9.147281,9.147281 -0.435585,39.202634 7.840527,7.404942 -0.435585,12.196375"  />
			<path class="lines" d="M 58.828952,36.652593 85.009375,10.472169 103.48967,10.164164"  />
			<path class="lines" d="m 108.41775,7.3921196 4.00407,-4.0040648 49.2808,0.61601 9.54815,9.5481542 14.78424,0.61601 17.55628,17.248279"  />
			<path class="lines" d="m 210.0594,37.268603 v 8.316134 l 8.93214,8.00813 0.30801,33.880548 -14.16823,14.168225 -41.27267,-0.308"  />
			<path class="lines" d="m 160.16259,95.481545 h -6.4681 l -11.08818,11.704185"  />
			<path class="lines" d="m 171.86678,95.481545 26.18042,0.61601"  />
			<path class="lines" d="m 204.82331,95.17354 9.85616,-9.548155 V 73.613191"  />
			<path class="lines" d="M 209.44339,66.221071 V 84.393365"  />
			<path class="lines" d="m 211.29142,54.208877 -7.08412,7.700125 V 89.01344"  />
			<path class="lines" d="M 195.27516,91.169475 174.02282,90.553465 166.9387,84.08536"  />
			<path class="lines" d="m 176.79486,85.93339 h 8.00813 l 9.85616,-9.548154 0.61601,-21.560349 6.4681,-7.084115"  />
			<path class="lines" d="m 199.27922,57.596932 v 20.636334 l -7.08411,7.084114"  />
			<path class="lines" d="m 149.07441,90.86147 -13.55222,13.55222 v 25.87242"  />
			<path class="lines" d="m 166.32269,90.86147 -5.85209,-5.54409 h -11.70419 l -18.1723,16.94027 v 32.03252 l -14.78424,14.78424"  />
			<path class="lines" d="m 179.2589,80.081296 -32.64853,-0.308005 -20.63633,20.328329 v 31.72451 l -14.16823,13.86023 -0.61601,23.71638"  />
			<path class="lines" d="m 168.17072,75.153216 h -23.10037 l -23.10038,22.792369 v 32.340525 l -14.78424,13.55222 v 33.57254"  />
			<path class="lines" d="m 97.63758,148.4584 4.31207,5.23609 v 9.24015"  />
			<path class="lines" d="m 184.18698,76.385236 -5.54409,-5.852095 -17.86429,-0.61601 -7.08411,-7.084114"  />
			<path class="lines" d="m 181.10693,67.145086 -5.54409,-5.852094 -12.01219,0.308005"  />
			<path class="lines" d="M 188.19104,66.837081 177.10287,56.364912 h -48.04878"  />
			<path class="lines" d="m 201.74326,38.500623 -12.3202,13.244214"  />
			<path class="lines" d="M 194.35114,37.884613 185.419,46.508752"  />
			<path class="lines" d="m 198.0472,32.032518 h -10.78017 l -6.1601,6.468105 h -13.24421"  />
			<path class="lines" d="m 190.65508,27.104438 -11.70418,-0.308004 -5.8521,5.852094"  />
			<path class="lines" d="m 185.11099,21.868354 h -9.54815 l -15.40025,15.400249"  />
			<path class="lines" d="M 170.32676,17.556284 153.38648,34.804563"  />
			<path class="lines" d="M 152.15446,21.868354 136.1382,39.116633 H 116.11788 L 101.64164,24.332394"  />
			<path class="lines" d="m 145.37835,37.268603 6.77611,7.39212 20.02033,-0.61601 16.01625,15.708254"  />
			<path class="lines" d="m 173.0988,51.436832 h -47.12476 l -8.31614,8.00813"  />
			<path class="lines" d="m 124.12601,62.217007 20.94434,-0.61601 7.70012,8.008129"  />
			<path class="lines" d="m 139.52626,68.069101 -6.1601,6.77611 v 6.160099"  />
			<path class="lines" d="m 164.16666,16.324264 h -15.40025 l -8.00813,8.00813"  />
			<path class="lines" d="m 137.06222,28.028453 -4.31207,4.620075 -15.40025,-0.308005"  />
			<path class="lines" d="m 138.60224,15.092244 -8.62414,9.85616 h -20.63633"  />
			<path class="lines" d="m 159.85459,11.396184 h -28.02846 l -7.70012,8.62414"  />
			<path class="lines" d="m 123.20199,10.472169 -7.70012,8.00813 -16.940275,0.308005"  />
			<path class="lines" d="m 144.17858,44.21186 -29.83756,-0.435585 -11.543,10.671828 -0.65338,21.561449"  />
			<path class="lines" d="m 111.29192,56.190442 0.21779,13.50313 10.67183,10.671828 -0.43558,10.671828"  />
			<path class="lines" d="M 128.49752,86.245795 128.27973,77.316306 117.6079,66.208893"  />
			<path class="lines" d="m 108.46062,76.009552 7.84053,7.840527"  />
			<path class="lines" d="m 116.73673,88.859304 -0.21779,37.895876 -14.3743,14.80989 -21.561448,0.21779"  />
			<path class="lines" d="m 100.62009,88.205927 8.49391,8.058319"  />
			<path class="lines" d="m 111.9453,100.83789 -14.592092,0.21779 -8.058319,-8.493905"  />
			<path class="lines" d="m 93.650737,87.988134 8.276113,8.276112"  />
			<path class="lines" d="m 85.156833,97.353208 8.929489,9.147282 h 18.294558"  />
			<path class="lines" d="m 108.89621,110.85634 -28.313018,0.21779 -9.147281,8.92949"  />
			<path class="lines" d="M 105.84711,115.64777 91.037228,116.08336 80.3654,126.75518"  />
			<path class="lines" d="M 87.988134,128.49752 95.393076,120.657"  />
			<path class="lines" d="m 112.59868,117.17232 -14.592095,15.24547 -20.036901,0.43558 -14.156507,-14.3743"  />
			<path class="lines" d="m 57.061612,118.26128 18.512355,19.16573 23.957165,-0.21779 12.849748,-12.63196"  />
			<path class="lines" d="M 105.19374,82.978909 H 92.12619 L 67.951233,106.71828"  />
			<path class="lines" d="M 62.724215,102.58023 83.632286,81.889947"  />
			<path class="lines" d="m 69.475779,86.899172 -8.058319,8.05832"  />
			<path class="lines" d="M 59.239536,88.205927 65.991101,81.23657 77.098514,81.018777"  />
			<path class="lines" d="m 56.84382,69.475779 6.31598,-0.217792 6.098187,6.533772"  />
			<path class="lines" d="m 62.28863,60.328498 14.592091,15.245469 20.036902,0.217792"  />
			<path class="lines" d="M 79.49423,70.129157 66.426686,56.408235 65.991101,47.696538"  />
			<path class="lines" d="m 68.386817,37.678087 9.582867,10.236244 20.036901,0.217792"  />
			<path class="lines" d="m 72.960458,33.322239 8.058319,8.276112"  />
			<path class="lines" d="m 86.028003,17.205601 7.404942,7.840526"  />
			<path class="lines" d="m 99.095547,30.926523 4.573643,4.355848 v 8.276111"  />
			<path class="lines" d="m 83.850079,24.610543 9.365073,9.582866 v 8.711696"  />
			<path class="lines" d="m 87.770342,52.705764 8.929489,8.929489 v 8.276111"  />
			<path class="lines" d="M 73.17825,53.141349 89.730474,69.693572"  />
		</g>
		<g>	
			<circle class="rectangle" cx="58.440441" cy="36.225616" r="2.25" />
			<circle class="rectangle" cx="103.18167" cy="10.164165" r="2.25" />
			<circle class="rectangle" cx="108.26376" cy="7.0841146" r="2.25" />
			<circle class="rectangle" cx="123.20199" cy="10.626171" r="2.25" />
			<circle class="rectangle" cx="98.407593" cy="18.634302" r="2.25" />
			<circle class="rectangle" cx="85.779388" cy="16.78627" r="2.25" />
			<circle class="rectangle" cx="93.017502" cy="24.794401" r="2.25" />
			<circle class="rectangle" cx="101.79565" cy="24.332394" r="2.25" />
			<circle class="rectangle" cx="109.49577" cy="24.794401" r="2.25" />
			<circle class="rectangle" cx="124.28001" cy="19.866322" r="2.25" />
			<circle class="rectangle" cx="159.85458" cy="11.242182" r="2.25" />
			<circle class="rectangle" cx="140.91228" cy="24.332394" r="2.25" />
			<circle class="rectangle" cx="136.44621" cy="28.028454" r="2.25" />
			<circle class="rectangle" cx="164.16666" cy="16.324265" r="2.25" />
			<circle class="rectangle" cx="170.17274" cy="18.018291" r="2.25" />
			<circle class="rectangle" cx="184.80299" cy="21.868353" r="2.25" />
			<circle class="rectangle" cx="190.65508" cy="26.950436" r="2.25" />
			<circle class="rectangle" cx="196.81519" cy="31.878515" r="2.25" />
			<circle class="rectangle" cx="203.7453" cy="31.416508" r="2.25" />
			<circle class="rectangle" cx="210.0594" cy="37.268604" r="2.25" />
			<circle class="rectangle" cx="201.12726" cy="39.116634" r="2.25" />
			<circle class="rectangle" cx="194.04314" cy="38.192619" r="2.25" />
			<circle class="rectangle" cx="185.88101" cy="46.046745" r="2.25" />
			<circle class="rectangle" cx="190.03908" cy="51.128826" r="2.25" />
			<circle class="rectangle" cx="201.58926" cy="48.048779" r="2.25" />
			<circle class="rectangle" cx="210.67542" cy="54.516884" r="2.25" />
			<circle class="rectangle" cx="199.27922" cy="57.750935" r="2.25" />
			<circle class="rectangle" cx="209.5974" cy="66.375076" r="2.25" />
			<circle class="rectangle" cx="209.44339" cy="83.469353" r="2.25" />
			<circle class="rectangle" cx="214.52547" cy="74.075195" r="2.25" />
			<circle class="rectangle" cx="204.20732" cy="95.635544" r="2.25" />
			<circle class="rectangle" cx="197.4312" cy="95.94355" r="2.25" />
			<circle class="rectangle" cx="172.3288" cy="95.481544" r="2.25" />
			<circle class="rectangle" cx="166.01468" cy="90.553467" r="2.25" />
			<circle class="rectangle" cx="167.2467" cy="84.085358" r="2.25" />
			<circle class="rectangle" cx="177.10286" cy="85.625389" r="2.25" />
			<circle class="rectangle" cx="192.81113" cy="84.85537" r="2.25" />
			<circle class="rectangle" cx="187.72903" cy="65.913063" r="2.25" />
			<circle class="rectangle" cx="187.88304" cy="58.828953" r="2.25" />
			<circle class="rectangle" cx="180.02892" cy="65.913063" r="2.25" />
			<circle class="rectangle" cx="164.16666" cy="61.446995" r="2.25" />
			<circle class="rectangle" cx="154.15649" cy="63.295025" r="2.25" />
			<circle class="rectangle" cx="183.87897" cy="75.923225" r="2.25" />
			<circle class="rectangle" cx="178.33488" cy="79.927292" r="2.25" />
			<circle class="rectangle" cx="152.15446" cy="68.839111" r="2.25" />
			<circle class="rectangle" cx="167.86272" cy="74.999214" r="2.25" />
			<circle class="rectangle" cx="139.06425" cy="68.531105" r="2.25" />
			<circle class="rectangle" cx="133.21216" cy="79.465286" r="2.25" />
			<circle class="rectangle" cx="128.28407" cy="84.393364" r="2.25" />
			<circle class="rectangle" cx="121.81597" cy="90.55143" r="2.25" />
			<circle class="rectangle" cx="115.65587" cy="82.85334" r="2.25" />
			<circle class="rectangle" cx="172.48279" cy="51.282829" r="2.25" />
			<circle class="rectangle" cx="118.42792" cy="58.520947" r="2.25" />
			<circle class="rectangle" cx="124.58801" cy="61.909" r="2.25" />
			<circle class="rectangle" cx="129.6701" cy="56.36491" r="2.25" />
			<circle class="rectangle" cx="193.88914" cy="90.707466" r="2.25" />
			<circle class="rectangle" cx="204.0533" cy="87.473419" r="2.25" />
			<circle class="rectangle" cx="164.32066" cy="100.87163" r="2.25" />
			<circle class="rectangle" cx="159.85458" cy="95.173538" r="2.25" />
			<circle class="rectangle" cx="142.76031" cy="106.72372" r="2.25" />
			<circle class="rectangle" cx="148.7664" cy="90.861473" r="2.25" />
			<circle class="rectangle" cx="168.32472" cy="38.500622" r="2.25" />
			<circle class="rectangle" cx="173.8688" cy="32.032516" r="2.25" />
			<circle class="rectangle" cx="160.77859" cy="36.344589" r="2.25" />
			<circle class="rectangle" cx="153.69449" cy="33.880547" r="2.25" />
			<circle class="rectangle" cx="145.53235" cy="37.114601" r="2.25" />
			<circle class="rectangle" cx="143.53032" cy="44.044712" r="2.25" />
			<circle class="rectangle" cx="152.00046" cy="22.330362" r="2.25" />
			<circle class="rectangle" cx="138.29424" cy="15.400249" r="2.25" />
			<circle class="rectangle" cx="118.11991" cy="32.18652" r="2.25" />
			<circle class="rectangle" cx="111.29192" cy="56.408234" r="2.25" />
			<circle class="rectangle" cx="118.04349" cy="66.426689" r="2.25" />
			<circle class="rectangle" cx="116.73673" cy="89.077095" r="2.25" />
			<circle class="rectangle" cx="108.34463" cy="75.587196" r="2.25" />
			<circle class="rectangle" cx="135.63022" cy="129.53204" r="2.25" />
			<circle class="rectangle" cx="99.258896" cy="31.089867" r="2.25" />
			<circle class="rectangle" cx="103.50584" cy="43.014" r="2.25" />
			<circle class="rectangle" cx="84.067871" cy="24.719439" r="2.25" />
			<circle class="rectangle" cx="93.324051" cy="42.523968" r="2.25" />
			<circle class="rectangle" cx="80.093163" cy="40.509388" r="2.25" />
			<circle class="rectangle" cx="73.123802" cy="33.594479" r="2.25" />
			<circle class="rectangle" cx="97.135414" cy="47.805435" r="2.25" />
			<circle class="rectangle" cx="68.604607" cy="38.004776" r="2.25" />
			<circle class="rectangle" cx="88.097031" cy="52.814659" r="2.25" />
			<circle class="rectangle" cx="96.75428" cy="68.822403" r="2.25" />
			<circle class="rectangle" cx="88.859306" cy="68.876854" r="2.25" />
			<circle class="rectangle" cx="73.396042" cy="53.359142" r="2.25" />
			<circle class="rectangle" cx="78.677505" cy="69.149094" r="2.25" />
			<circle class="rectangle" cx="65.936653" cy="47.91433" r="2.25" />
			<circle class="rectangle" cx="58.205021" cy="42.796207" r="2.25" />
			<circle class="rectangle" cx="62.451973" cy="60.491844" r="2.25" />
			<circle class="rectangle" cx="57.551643" cy="69.366882" r="2.25" />
			<circle class="rectangle" cx="68.659058" cy="74.975037" r="2.25" />
			<circle class="rectangle" cx="76.281792" cy="80.746536" r="2.25" />
			<circle class="rectangle" cx="59.784016" cy="87.4981" r="2.25" />
			<circle class="rectangle" cx="68.822403" cy="87.062515" r="2.25" />
			<circle class="rectangle" cx="61.961941" cy="94.086319" r="2.25" />
			<circle class="rectangle" cx="83.087807" cy="82.162186" r="2.25" />
			<circle class="rectangle" cx="63.10535" cy="101.9813" r="2.25" />
			<circle class="rectangle" cx="68.441269" cy="106.01046" r="2.25" />
			<circle class="rectangle" cx="85.15683" cy="97.298759" r="2.25" />
			<circle class="rectangle" cx="89.349335" cy="92.507324" r="2.25" />
			<circle class="rectangle" cx="93.705185" cy="87.933685" r="2.25" />
			<circle class="rectangle" cx="56.626026" cy="109.82182" r="2.25" />
			<circle class="rectangle" cx="57.061611" cy="118.09794" r="2.25" />
			<circle class="rectangle" cx="63.976521" cy="118.37018" r="2.25" />
			<circle class="rectangle" cx="71.544807" cy="119.89472" r="2.25" />
			<circle class="rectangle" cx="80.419846" cy="126.64629" r="2.25" />
			<circle class="rectangle" cx="88.04258" cy="128.27972" r="2.25" />
			<circle class="rectangle" cx="95.229729" cy="120.60255" r="2.25" />
			<circle class="rectangle" cx="81.073227" cy="141.61952" r="2.25" />
			<circle class="rectangle" cx="97.788795" cy="148.58888" r="2.25" />
			<circle class="rectangle" cx="115.92001" cy="148.64331" r="2.25" />
			<circle class="rectangle" cx="101.8724" cy="161.98311" r="2.25" />
			<circle class="rectangle" cx="106.88163" cy="176.73854" r="2.25" />
			<circle class="rectangle" cx="111.18303" cy="168.40799" r="2.25" />
			<circle class="rectangle" cx="111.9453" cy="124.63171" r="2.25" />
			<circle class="rectangle" cx="112.27199" cy="117.44456" r="2.25" />
			<circle class="rectangle" cx="104.97594" cy="115.32108" r="2.25" />
			<circle class="rectangle" cx="108.56952" cy="110.69299" r="2.25" />
			<circle class="rectangle" cx="111.89085" cy="106.22825" r="2.25" />
			<circle class="rectangle" cx="111.34637" cy="100.56564" r="2.25" />
			<circle class="rectangle" cx="108.40617" cy="95.338631" r="2.25" />
			<circle class="rectangle" cx="100.83789" cy="95.01194" r="2.25" />
			<circle class="rectangle" cx="100.94678" cy="88.151482" r="2.25" />
			<circle class="rectangle" cx="104.75815" cy="82.815567" r="2.25" />
			<circle class="rectangle" cx="102.14464" cy="75.356171" r="2.25" />
			<circle class="rectangle" cx="96.209801" cy="75.573967" r="2.25" />
		</g>
	</g>

</svg>
    </a>
</div>

            <!-- menu, we did go with a static one, you can build a dynamic one, just google a little around -->
<div class="main-menu">
    <div class="content">
        <nav id="menu">
            <a class="toggle-link noline"><i class="fa fa-close fa-lg"></i></a>
            <ul>
                <li>
                    <a class="homelink" href="/">Home</a>
                </li>
                <li>
                    <a href="/archive">Archive</a>
                </li>
                <li>
                    <a href="/about">About us</a>
                </li>
				<li><a class="dropdown-button" href="#" data-activates='sitelinks'>Related sites &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-caret-down"></i></a>
                </li>
				<div id="sitelinks" class="dropdown-content">
                    <li>
                        <a href="https://www.upare.com">upare</a>
                    </li>
					<li>
                        <a href="https://www.nnir.net">nnir.net</a>
                    </li>
                    <li>
                        <a href="https://www.bjut.edu.cn">BJUT</a>
                    </li>
                    
                </div>
				<!--
                <li><a class="dropdown-button" href="#" data-activates='drop-example'>Page Layouts&nbsp;&nbsp;<i class="fa fa-caret-down"></i></a>
                </li>
                <div id="drop-example" class="dropdown-content">
                    <li>
                        <a href="/page-full">page-full</a>
                    </li>
                    <li>
                        <a href="/page-classic-sidebar-right">page classic sidebar right</a>
                    </li>
                    <li>
                        <a href="/page-classic-sidebar-left">page classic sidebar left</a>
                    </li>
                    <li>
                        <a href="/page-material-sidebar-right">page material sidebar right</a>
                    </li>
                    <li>
                        <a href="/page-material-sidebar-left">page material sidebar left</a>
                    </li>
                </div>
				-->
                <li>
                    <a href="#colorswitch" class="modal-trigger">Modify color&nbsp;&nbsp;<i class="fa fa-cog"></i></a>
                </li>
            </ul>
        </nav>
        <nav class="iconnav">
            <ul>
                <li class="sicon">
                    <a href='#search'><i class='fa fa-search'></i></a>
                </li>
                
                <li class="social">
                    <a href="#" class="tumblr"><i class="fa fa-tumblr"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="pinterest"><i class="fa fa-pinterest"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="instagram"><i class="fa fa-instagram"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="twitter"><i class="fa fa-twitter"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="facebook"><i class="fa fa-facebook"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="youtube"><i class="fa fa-youtube"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="vimeo"><i class="fa fa-vimeo-square"></i></a>
                </li>
                 
                <li class="social">
                    <a href="#" class="soundcloud"><i class="fa fa-soundcloud"></i></a>
                </li>
                
            </ul>
        </nav>
        <a href='#menu' class="toggle-link noline">
            <i class="fa fa-navicon"></i>
        </a>
    </div>
</div>




<div id="colorswitch" class="modal color-change">
    <div class="modal-content">
      <h4>Change Color Palette</h4>
      <p>
      <img id="indigo" alt="color palette preview indigo" src="/img/indigo.jpg">
      <img id="brown" alt="color palette preview brown" src="/img/brown.jpg">
      <img id="green" alt="color palette preview green" src="/img/green.jpg">
      <img id="teal" alt="color palette preview teal" src="/img/teal.jpg">
      </p>
    </div>
    <div class="modal-footer">
      <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">close</a>
    </div>
  </div>
        </header>
        <div id="search">
    <form role="search" id="searchform">
        <input type="search" placeholder="Search"/>
    </form>
</div>

        <div class="margin">
            <div class="content full">
                <div class="content-container">
                    <article>
                        

                        <h1 class="post-title">
                            快速看懂支持向量机
                        </h1>
                        <div class="meta">
                            

    <span class="author">Posted by
        
        
    </span>

 &bull;
                            <span class="date">
                                Published on June 03, 2019
                            </span>
                        </div>
                        
                            
                                <img class="featimg" src="http://www.upare.net/tools/images/quote?savepath=quoteimg/brainscc&url=https://p3-tt.byteimg.com/origin/pgc-image/b14f689acfb94e968e379121dee31bbb.jpg" alt="https://p3-tt.byteimg.com/origin/pgc-image/b14f689acfb94e968e379121dee31bbb.jpg">
                            
                        
                        <div class="post-content">
                            <h1 id="1-前言"><strong>1 前言</strong></h1>

<p><strong>支持向量机（support vector machines，SVM）</strong>是我最早接触的有监督分类算法之一。早在 MIT 修统计学的时候，我用它做过一个旧金山湾区上班族通勤模式的分类研究，但当时只是很粗浅的认识。后来由于工作的关系又非常系统的学习了一下，这其中包括认真学习了斯坦福 Andrew Ng（吴恩达）的机器学习课（吴讲的真的非常好，深入浅出），参阅了大量的关于 SVM 的理论和实际应用的文献。</p>

<p>对于有监督分类算法的表现，业界常用大概 10 种不同的指标来评判，包括 Accuracy，LIFT，F-Score，ROC，Precision / Recall Break-Even Point，Root Mean Squared Error 等。<strong>无论以哪种准确性的评价指标来看，SVM 的效果都不输于人工神经网络 ANN 或者高级的集合算法如随机森林。</strong>SVM 的另一个特点是其自身可以在一定程度上防止过拟合，这对于其在量化投资上的应用格外重要。这是因为任何人工智能算法有效的前提是：<strong>历史样本和未来样本是来自同一个（未知）的整体，满足同分布</strong>。只有这样，基于历史样本学习出来的规律才会在未来继续有效。<strong>但是对于金融数据来说，这个假设在很多问题上无法满足。</strong>因此，如果机器学习算法在历史数据上过拟合的话，那么基本可以肯定这个模型对未来的数据毫无作用。</p>

<p>鉴于我对 SVM 的钟爱，我很早以前就打算写一篇介绍它的短文，作为对知识的一个梳理。不过后来，我读了一篇来自 quantstart.com 的文章，名为 Support Vector Machines: A Guide for Beginners。作者并没有使用大量的数学公式，而是用精炼的语言和恰如其分的图例对 SVM 的基本原理进行了阐述。平心而论，让我自己憋几天也不一定能写的比人家更清晰和生动，因此今天不如就索性把这篇文章大致翻译过来，作为对 SVM 的一个介绍。我会跳过一些不影响理解的文字、对原文的结构做一些改动，并在一些地方加入自己的理解（<strong>在第 7、8 节中，有一些该文没有的核心内容</strong>）。对那些阅读英语比阅读中文更舒服的小伙伴，也不妨看看原文https://www.quantstart.com/articles/Support-Vector-Machines-A-Guide-for-Beginners。</p>

<h1 id="2-初识-svm"><strong>2 初识 SVM</strong></h1>

<p>支持向量机解决的是<strong>有监督的二元分类问题（supervised binary classification）</strong>：</p>

<blockquote>
  <p><strong>对于新的观测样本，我们希望根据它的属性，以及一系列已经分类好的历史样本，来将这个新样本分到两个不同的目标类中的某一类。</strong></p>
</blockquote>

<p>垃圾邮件识别就是这么一个例子：一个邮件要么属于垃圾邮件，要么属于非垃圾邮件。对于一封新邮件，我们希望机器学习算法自动对它分类。为此，我们首先通过人工对大量的历史邮件进行 spam 或 non-spam 标识，然后用这些标识后的历史邮件对机器学习算法进行训练。</p>

<p>在处理这类分类问题时，SVM 的作用对象是样本的特征空间（feature space），它是一个有限维度的向量空间，每个维度对应着样本的一个特征，而这些特征组合起来可以很好的描述被分类的样本。比如在上面的垃圾邮件识别例子中，一些可以有效辨别 spam 和 non-spam 邮件的词汇就构成了特征空间。</p>

<p>为了对新的样本分类，SVM 算法会根据历史数据在特征空间内构建一个超平面（hyperplane）；它将特征空间线性分割为两个部分，对应着分类问题的两类，分别位于超平面的两侧。构建超平面的过程就是模型训练过程。对于一个给定的新样本，根据它的特征值，它会被放在超平面两侧中的某一侧，这便完成了分类。不难看出，SVM 是一个非概率的线性分类器。这是因为 SVM 模型回答的是非此即彼的问题，新样本会被确定的分到两类中的某一类。</p>

<p>在数学上表达上，每一个历史样本点由一个 (<strong>x</strong>, y) 元组表示，其中粗体的 <strong>x</strong> 是特征向量，即 <strong>x</strong> = (x_1, …, x_p)，其中每一个 x_j 代表样本的一个特征，而 y 代表该样本的已知分类（通常用 +1 和 -1 表示两个不同的类）。SVM 会根据这些给定的历史数据来训练算法的参数，找到最优的线性超平面。理想情况下，这个超平面可以将两类样本点完美的分开（即没有错分的情况）。<strong>对于给定的训练数据，可以将它们完美分开的超平面很可能不是唯一的，比如一个超平面稍微旋转一个角度便得到一个仍然能够完美分割的超平面。在众多的能够实现分类的超平面中，只有一个是最优的。</strong>我们会在下文介绍这个“最优”的定义。</p>

<p><strong>在实际应用中，很多数据并非是线性可分的。</strong>SVM 的强大之处在于它不仅仅局限于是一个高维空间的线性分类器。<strong>它通过非线性的核函数（kernel functions）把原始的特征空间映射到更高维的特征空间（可以是无限维的），在高维空间中再将这些样本点线性分割。高维空间的线性分割对应着原始特征空间的非线性分割，因此在原始特征空间中生成了非线性的决策边界。此外，这么做并不以增加计算机的计算负担为代价。因此 SVM 相当高效。</strong></p>

<p>下面，我们会解释如何找到最优的线性超平面。基于它引出最大间隔分类器（maximal margin classifier）的概念。通过实例，我们会发现最大间隔分类器有时无法满足实际问题，这是因为不同类型的样本点错综的交织在一起，让它们无法被完美分割。为了解决这个问题，我们必须允许分类器故意的错误划分一些点，从而得到对整体样本总体分类效果的最优，这便引出了支持向量分类器（support vector classifier）。最后，我们介绍核函数的概念。支持向量分类器结合核函数便得到了支持向量机。最后，我们总结 SVM 的优缺点。</p>

<h1 id="3-线性超平面"><strong>3 线性超平面</strong></h1>

<p><strong>线性超平面是 SVM 的核心。</strong>对于一个 p 维空间，超平面是一个 p-1 维的物体，它将这个 p 维空间一分为二。下图分别是 2 维和 3 维特征空间中超平面的例子。在 2 维特征空间中，超平面就是一条 1 维的直线，在 3 维特征空间中，超平面是一个 2 维的平面。（注意，我们并不要求超平面一定要通过特征空间的原点。）</p>

<p><img src="https://p3-tt.byteimg.com/origin/pgc-image/b14f689acfb94e968e379121dee31bbb.jpg" alt="一文看懂支持向量机" /></p>

<p>对于一个 p 维的特征空间 <strong>x</strong> = (x_1, …, x_p)，我们可以通过下面这个式子来定义一个超平面：</p>

<p><img src="https://p6-tt.byteimg.com/origin/pgc-image/92f3bc402caf4b328e602927a5d816cc.jpg" alt="一文看懂支持向量机" /></p>

<p>如果用向量和内积来表达，这个式子变为 <strong>b</strong>•<strong>x</strong> + b_0 = 0。任何满足这个式子的向量 <strong>x</strong> 都落在这个 p-1 维超平面上。该超平面将 p 维特征空间分为两个区域，如下图所示（示意图，假设 p = 2，两个颜色代表特征空间中两个不同的区域）：</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/2b839baadf3249fb985eaa8cf7c4247b.jpg" alt="一文看懂支持向量机" /></p>

<p>如果一个向量 <strong>x</strong> 满足 <strong>b</strong>•<strong>x</strong> + b_0 &gt; 0，则它会落在超平面上方的区域；如果一个向量 <strong>x</strong> 满足 <strong>b</strong>•<strong>x</strong> + b_0 &lt; 0，则它会落在超平面下方的区域。通过判断 <strong>b</strong>•<strong>x</strong> + b_0 的符号，就可以对 <strong>x</strong> 分类。</p>

<h1 id="4-分类问题"><strong>4 分类问题</strong></h1>

<p>在邮件识别的例子中，假设我们有 n 个历史邮件，每一封都被标识为 spam（+1）或者 non-spam（-1）。每一封邮件中都有一些词被选为关键词。所有这 n 封邮件中不重复的关键词就组成了我们的特征。假设不重复的关键词一共有 p 个。</p>

<p>如果将上面这个问题用数学语言转化为分类问题，则我们有 n 个训练样本，每一个样本都是一个 p 维的特征向量 <strong>x</strong>_i。此外，每一个训练样本都有一个已知的分类 y_i（例如 spam 或者 non-spam）。因此，我们有 n 对训练样本 (<strong>x</strong>_i, y_i)。分类器将通过学习这些训练样本来优化自身的参数，得到最终的分类模型。我们使用测试样本来检查分类器的分类效果。</p>

<p>让我们来看一个简化的例子。考虑 2 维特征空间并假设训练样本都是完美可分的（如下图所示）。图中，红色和蓝色代表了两类不同的样本点。三天虚线表示三个不同的超平面；它们都可以将这些点完美分开。</p>

<p><img src="https://p3-tt.byteimg.com/origin/pgc-image/d00f568dc7194309a817157487ab4855.jpg" alt="一文看懂支持向量机" /></p>

<p>在这个例子中，这三条线都可以将特征空间一分为二。然而，我们如何确定哪条线才是最优的呢？<strong>直观上说，无论是（1）还是（3），都离某些红色和蓝色的样本点太近了，给我们的感觉是这两条线仅是“将将”把这些点分开；而位于中间的（2）号虚线离任何红色的和蓝色的点都比较远，给我们的感觉是它非常清晰地将这些点区分开了。因此，如果从这三条里面选的话，（2）号虚线应该是最好的选择。</strong>在数学上，上述直观感受被精确的翻译为数学优化方程，即最大间隔超平面。</p>

<h1 id="5-最大间隔超平面"><strong>5 最大间隔超平面</strong></h1>

<p>在上一节中，我们看到能够实现分类的超平面可能不唯一。在这种情况下我们需要找到最优的。对于一个给定的超平面，我们可以计算每个样本点到该平面的距离，<strong>这些距离中最小的一个就是这个超平面的间隔距离（margin）</strong>。因此，对于每一个超平面我们可以计算出它的 margin。<strong>所有可行的超平面中，margin 最大的那个就是我们要找的最优超平面，即最大间隔超平面（maximal margin hyperplane）。</strong>使用该超平面进行分类的分类器就称为<strong>最大间隔分类器</strong>。</p>

<p>考虑下面这个 2 维特征空间示意图。图中有红色和蓝色两类样本点。黑色的实线就是最大间隔超平面。在这个例子中，A，B，C 三个点到该超平面的距离相等。<strong>注意，这些点非常特别，这是因为超平面的参数完全由这三个点确定。该超平面和任何其他的点无关。</strong>如果改变其他点的位置，只要其他点不落入虚线上或者虚线内，那么超平面的参数都不会改变。A，B，C 这三个点被称为<strong>支持向量（support vectors）</strong>。最大间隔超平面非常依赖支持向量的位置（这很明显是个缺点，我们会在后面解决）。</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/744ff2e8f2c6469787f3c938452ca916.jpg" alt="一文看懂支持向量机" /></p>

<p>在数学上，求解最大间隔超平面参数相当于求解下面这个最优化问题：</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/33bc955b55aa46c4be72e54ec6ac63ef.jpg" alt="一文看懂支持向量机" /></p>

<p>这个优化问题虽然看起来复杂，但是它非常容易求解，不过关于它的求解过程不在本文的讨论范围内。</p>

<p>需要强调的是，上面的假想例子假设两类样本点是可以完美的被分开的。而在在实际问题中，这样的情况几乎是不存在的。考虑下面的例子，红蓝两类样本点纠结在一起，我们无法找到一个超平面将它们完美的分开。</p>

<p><img src="https://p6-tt.byteimg.com/origin/pgc-image/188056d84e9946f29e98ee14944640f3.jpg" alt="一文看懂支持向量机" /></p>

<p>在这种情况下，我们怎么办呢？<strong>解决的思路是放松我们的要求，即我们不要求所有的训练样本都被正确的分类，由此引出软间隔（soft margin）和支持向量分类器（support vector classifier）的概念。</strong></p>

<h1 id="6-支持向量分类器"><strong>6 支持向量分类器</strong></h1>

<p>引出软间隔和支持向量分类器的概念有两个动机。</p>

<p><strong>第一个动机是最大间隔分类器非常依赖支持向量的位置，这使得它对新的训练样本非常敏感。</strong>考虑下面这个例子，右图中仅仅因为增加了一个训练样本而它恰好是支持向量，前后得到的超平面完全不同。很显然，左图中的超平面对所有点的整体分类效果更好，而右图中因为一个新样本的加入，造成了模型的过拟合。</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/a6c09cd2b31e45a290065e404aed2029.jpg" alt="一文看懂支持向量机" /></p>

<p><strong>第二个动机就是上一节最后提到的，实际问题中，训练样本几乎无法被完美分开。</strong></p>

<p>为了解决这两种情况，我们允许一部分样本点被错误的分类，并以此为代价追求分类器的鲁棒性以及分类器在全局所有样本点上分类效果的整体最优。一个支持向量分类器允许一些样本点出现在最大间隔线之内甚至是超平面错误的一侧。下图左图中，A、B 两点虽然没有被分错类，但它们出现在了最大间隔边界（虚线）之内；下图右图中，C 和 D 两点则出现在超平面错误的一侧。然而付出这些代价所换取的都是中间这条整体分类效果非常好的超平面（黑色实线）。</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/bf642bda7e104f2791e937ed7b5b462b.jpg" alt="一文看懂支持向量机" /></p>

<p>在数学上，引入 soft margin 后，优化问题变为如下形式：</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/9e0e95e1be8c4e4f8ba27e244def27ef.jpg" alt="一文看懂支持向量机" /></p>

<p>其中，对于每一个训练样本点 i，定义了一个非负的松弛系数 e_i，它的取值表示该点是否满足最大间隔。e_i 等于 0 则表示该点满足最大间隔；如果 e_i 在 0 和 1 之间，说明这个样本点在最大间隔边界之内但仍然分类正确；如果 e_i 大于 1 这说明该点被分到了超平面的错误一侧。</p>

<p>系数 C 表示我们允许 soft margin 的程度。C 越小意味着我们越不允许出现不满足最大间隔的情况。从直观上说，C 的取值决定了最多有多少个训练样本点可以被分类错误。下面的例子说明，对于不同的 C 的取值，得到的超平面也会有很大差异。</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/2bd3c462aaed4f4a90b2f89a4a804b19.jpg" alt="一文看懂支持向量机" /></p>

<p><strong>一个分类器的误差由它的偏差和方差共同决定。在选取 C 时，我们必须权衡这两者。一个很小的 C 往往意味着模型有很低的偏差但是很高的方差（因为新的样本点会很容易改变超平面的参数）；一个很大的 C 通常意味着模型有很高的偏差（无法充分利用数据、找到有效的支持向量）和较低的方差。在实际应用中，C 的取值可以通过交叉验证来确定。</strong></p>

<h1 id="7-支持向量机"><strong>7 支持向量机</strong></h1>

<p>支持向量分类器是一个很好的线性分类器（在允许错误样本分类的前提下，找到对整体最优的超平面）。<strong>然而对于有的问题，数据本身的特性决定了线性分类器无论如何也不可能取得很好的效果。</strong>考虑下面这个例子。</p>

<p><img src="https://p3-tt.byteimg.com/origin/pgc-image/26bd2273ae2f44a5a610cddf79c157a1.jpg" alt="一文看懂支持向量机" /></p>

<p>如果仅使用线性的支持向量分类器，则只能得到上图中黑色实线表示的超平面。它的分类效果是非常差的。这时，我们就需要对这个分类器进行非线性的变换，这就是支持向量机。</p>

<p><strong>这里变换的核心是对特征空间进行非线性的变换。</strong>比如，对于 p 个特征 x_1, …, x_p，我们可以通过平方把它们变换到 2p 维的特征空间，即 x_1, (x_1)^2, …, x_p, (x_p)^2。然后在 2p 空间内寻找线性的超平面进行分类。虽然超平面在 2p 维度是线性的，但是由于它是原始特征的二次函数，因此从原始特征空间来看，我们实际上得到了一个非线性的分类器！</p>

<p>那什么是核函数呢？<strong>在求解超平面参数的最优化问题中，最优参数的取值仅仅依赖于训练样本特征向量之间的内积。</strong>假设两个样本点的特征向量为 <strong>x</strong> 和 <strong>z</strong>，则它们的内积为 <strong>x</strong>•<strong>z</strong>（或者 (<strong>x</strong>^T)<strong>z</strong>）。假设特征空间的非线性映射为 phi，因此在映射后我们的样本特征向量变为 phi(<strong>x</strong>) 和 phi(<strong>z</strong>)。在这个新的特征空间求解超平面时，我们需要使用的实际上是 phi(<strong>x</strong>)•phi(<strong>z</strong>)。对于这个映射，我们定义它对应的<strong>核函数</strong>为：K(<strong>x</strong>, <strong>z</strong>) = phi(<strong>x</strong>)•phi(<strong>z</strong>)。</p>

<p>因此，在优化问题的求解中，我们只要把 <strong>x</strong>•<strong>z</strong> 都替换为 K(<strong>x</strong>, <strong>z</strong>) 就相当于是在 phi 这个映射下的特征空间内求解超平面。当我们知道映射 phi 的形式后，可以通过分别计算 phi(<strong>x</strong>) 和 phi(<strong>z</strong>)，然后再求它们的内积得到 K(<strong>x</strong>, <strong>z</strong>)。然而，这对于计算机来说是非常低效的。假如原始特征空间的维度为 p，而我们把它映射到维度为 p^2 的特征空间，则 SVM 算法的计算量就由 O(p) 变成了 O(p^2)。如果 p 很大的话（在很多实际问题中，p 是非常大的），这么做会大大的损害 SVM 的效率。</p>

<p>对此，<strong>核函数的优势是，对于很多应用中常见的特征空间映射 phi 函数，核函数</strong> K(<strong>x, z</strong>) <strong>存在一个非常方便计算的解析式。</strong>通过计算这个解析式，我们便可以绕过计算 phi(<strong>x</strong>) 和 phi(<strong>z</strong>)，而直接得到 K(<strong>x</strong>, <strong>z</strong>) 的取值。然后我们只需要将 K(<strong>x</strong>, <strong>z</strong>) 的值带到最优化参数的解中，便可得到最优的超平面。这大大的降低了 SVM 的计算时间，使其成为高维空间分类的利器。</p>

<p>让我们来看一个例子，考虑下面这个核函数（它又称作多项式核）：</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/68628d756eb64822b2cf8bbe065d652f.jpg" alt="一文看懂支持向量机" /></p>

<p>它的计算量只有 O(p)。当 p = 3 时，它对应的映射 phi 却是下面这个 13 维空间！</p>

<p><img src="https://p6-tt.byteimg.com/origin/pgc-image/b409bbd2c7da4648b14a8d899fc09102.jpg" alt="一文看懂支持向量机" /></p>

<p>仅仅通过计算核函数的表达式就相当于巧妙的进行了从 3 维到 13 维空间的非线性映射，这是多么美妙！</p>

<p><strong>SVM的核心就是通过使用核函数（某一个给定的非线性方程），将原始的特征空间变换为更高维的特征空间。</strong></p>

<p>常见的核函数除了上面这个多项式核外，还有径向基（高斯）核。它的表达式如下，这里不再赘述。</p>

<p><img src="https://p3-tt.byteimg.com/origin/pgc-image/d8684fd844994c8a954fb07f5151b3f8.jpg" alt="一文看懂支持向量机" /></p>

<p>对于前面那个线性分类器无能为力的例子，在使用了适当的核函数后，我们可以在原始特征空间得到非线性的分类边界（下面左图使用了多项式核，右图使用了高斯核）。显然，它们的分类效果比线性分类器的效果要好很多，这是因为它们充分利用了训练数据的非线性特征。</p>

<p><img src="https://p1-tt.byteimg.com/origin/pgc-image/fe75b5c2b89c4e9aa41450d4c282ab86.jpg" alt="一文看懂支持向量机" /></p>

<h1 id="8-svm-的优缺点"><strong>8 SVM 的优缺点</strong></h1>

<p><strong>优点：</strong></p>

<ol>
  <li><strong>高维度：</strong>SVM 可以高效的处理高维度特征空间的分类问题。这在实际应用中意义深远。比如，在文章分类问题中，单词或是词组组成了特征空间，特征空间的维度高达 10 的 6 次方以上。</li>
  <li><strong>节省内存：</strong>尽管训练样本点可能有很多，但 SVM 做决策时，仅仅依赖有限个样本（即支持向量），因此计算机内存仅仅需要储存这些支持向量。这大大降低了内存占用率。</li>
  <li><strong>应用广泛：</strong>实际应用中的分类问题往往需要非线性的决策边界。通过灵活运用核函数，SVM 可以容易的生成不同的非线性决策边界，这保证它在不同问题上都可以有出色的表现（当然，对于不同的问题，如何选择最适合的核函数是一个需要使用者解决的问题）。</li>
</ol>

<p><strong>缺点：</strong></p>

<ol>
  <li><strong>不易解释特征的重要性</strong>（这是我自己加的，我认为这条最重要）：SVM 取得优异的分类效果固然可喜，但人们更愿意知道是哪些特征起了作用（解释特征的重要性）。在这方面，SVM 更像是一个黑盒（这可能也是增加其神秘色彩的直接原因）。SVM 在特征空间构建了最优的超平面。在数学上，超平面是这 p 个特征的线性组合，SVM 的分类依据是将待分类样本点的特征值带入到这个线性组合中，然后看它的结果是大于 0 还是小于 0。不难看出，在特征的线性组合中，<strong>每个特征的系数</strong> b_j <strong>的绝对值的大小可以在一定程度上反映特征的重要性，这是因为当某个特征的系数非常接近 0 时，该特征对于线性组合的符号的影响会非常微弱。</strong>然而，<strong>这种方便的解释仅仅在我们没有使用非线性核的时候适用</strong>。当我们使用了一些复杂的非线性核函数将原始特征空间扩展到更高维的特征空间后，我们很难知道新生成的特征长什么样子（即求解时，我们只关心核函数的解析表达式，而“不关心”该核函数对应的特征空间映射 phi 长什么样子，因此我们就无法知道映射后的特征长什么样子）。因此，即便我们知道某个映射后的特征的系数（的绝对值）很大，如果我们不知道特征的表达式，我们仍然无法解释。再退一步说，即便我们知道映射 phi 的形式，也知道映射后特征的表达式，映射后的特征仍然是原始特征的非线性方程，例如 x_1×sqrt(x_2)×exp(x_3)，这种原始特征的复杂非线性组合也许很难从问题本身的业务逻辑中得到令人满意的解释。</li>
  <li><strong>非概率性：</strong>在某些分类问题中，我们希望分类器告诉我们这个样本多大的概率属于第一类，多大的概率属于第二类，这些概率有助于我们判断分类的可信程度。SVM 无法直接回答这个问题，因为样本只能在超平面的某一侧。但是我们仍然可以通过计算样本点到超平面的距离来做近似的判断：样本点越远离超平面，它属于该类的可能性越高；样本点越靠近超平面，它属于该类的可能性也相应降低。</li>
  <li><strong>要求样本数大于特征数：</strong>特征数 p 大于样本数 n 会使 SVM 的效果大打折扣。这很好理解。因为如果没有足够的样本，就无法在特征空间中找到真正有效的支持向量，这样在面对新的待分类样本时，SVM 的分类效果就会变得很差。</li>
</ol>

<h1 id="9-结语"><strong>9 结语</strong></h1>

<p>SVM 算是有监督分类算法的一个利器。它原理清晰、计算高效、易在高维空间处理非线性关系。<strong>但是，和任何一个机器学习算法一样，最难的不是使用一个算法，而是真正明白我们要解决的问题。</strong>如果问题的本质需要非线性分类边界，而我们使用了线性的核函数，那结果可想而知。反过来也是一样。</p>

<blockquote>
  <p>https://www.toutiao.com/i6698315325579985420</p>
</blockquote>

                        </div>
                        
                        <div class="catsandtags">
                            
                            <span class="category">
                                <span class="name">categories:</span>
                                deeplearning
                            </span>
                            
                            
                                &bull;
                            
                            
                            <span class="tags">
                                <span class="name">tags:</span>
                                
                                    <a href="/tag/svm">svm</a>
                                
                            </span>
                            
                        </div>
                        
                    </article>
                    <div class="post-nav">
                        
                        <a class="btn prev" href="/category/mathematics/2015-09-10-matrix-operation.html"><i class="fa fa-angle-left"></i><span class="short"> prev</span><span class="long">ious post</span></a>
                        
                        
                        <a class="btn next" href="/category/deeplearning/2021-02-05-reduced-neural-network-size-six-times-without-post-training.html"><span class="short">next </span><span class="long">post </span><i class="fa fa-angle-right"></i></a>
                        
                    </div>
                </div>
				
<div id="SOHUCS" sid=""></div>
<script charset="utf-8" type="text/javascript" src="https://cy-cdn.kuaizhan.com/upload/changyan.js" ></script>
<script type="text/javascript">
	window.changyan.api.config({
	appid: 'cyvj1zDpk',
	conf: 'prod_b9c0041535f8ae49887b134ea9cc42ec'
	});
</script>
            </div>
        </div>
        <footer>
    <div class="content">
        <span>&copy; Brains control center </span>
        <span class="backtotop">back to top</span>
    </div>
</footer>
<script src="/js/build/global.min.js"></script>
<!-- analytics -->
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?00bf711faf23e1c302727de1da016431";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();

$("#SOHUCS").attr("sid",window.location.pathname);

$(".post-content img").each(function(){

	var src = $(this).attr("src");
	
	var host = getHostname(src);
	
	if(host !=null && host != 'http://www.upare.net'){
	
		$(this).attr('src','http://www.upare.net/tools/images/quote?savepath=quoteimg/brainscc&url='+src);
	}
	
});

function getHostname(url) {
	var m = url.match(/^(http|https):\/\/[^/]+/);
	return m ? m[0] : null;
}

</script>


        
    </body>
</html>
